<!-- head -->
{include file='public/head' /}
<!-- head -->

<!-- left -->
{include file='public/left' /}
<!-- left -->

<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            订单详情
            <small></small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 店铺管理</a></li>
            <li><a href="#">店铺列表</a></li>
            <li><a href="#">查看详情</a></li>
            <li><a href="#">订单信息</a></li>
            <li class="active">查看详情</li>
        </ol>
    </section>

    <div class="pad margin no-print">
        <div class="callout callout-info" style="margin-bottom: 0!important;">
            <h4><i class="fa fa-info"></i> 注意:</h4>
            该订单为客户真实操作产生的数据，数据真实可靠，如有疑问必是脏数据捣乱.
        </div>
    </div>

    <!-- Main content -->
    <section class="invoice">
        <!-- title row -->
        <div class="row">
            <div class="col-xs-12">
                <h2 class="page-header">
                    <i class="glyphicon glyphicon-globe"></i> 订单信息
                    <small class="pull-right">下单时间: {$orderdetails.add_time|date='Y-m-d H:i:s',###}</small>
                </h2>
            </div>
            <!-- /.col -->
        </div>
        <!-- info row -->
        <div class="row invoice-info">
            <div class="col-sm-3 invoice-col">
                <b><span style="font-size: 16px;">基本信息</span></b><br>
                <address style="line-height: 28px; margin-top: 5px;">
                    购买次数：{$orderdetails.itemdata.number}<br>
                    订单号：{$orderdetails.ord_num}<br>
                    实际金额：{$orderdetails.real_money}<br>
                    实付金额：{$orderdetails.pay_money}<br>
                    订单状态:  
                    {if condition="$orderdetails.status eq 0"}<span class="badge bg-yellow">已取消</span>
                    {elseif condition="$orderdetails.status eq 1"/}<span class="badge bg-yellow">待支付</span>
                    {elseif condition="$orderdetails.status eq 2"/}<span class="badge bg-yellow">待预约</span>
                    {elseif condition="$orderdetails.status eq 3"/}<span class="badge bg-yellow">已预约</span>
                    {elseif condition="$orderdetails.status eq 4"/}<span class="badge bg-yellow">待服务</span>
                    {elseif condition="$orderdetails.status eq 5"/}<span class="badge bg-yellow">已拒绝</span>
                    {elseif condition="$orderdetails.status eq 6"/}<span class="badge bg-yellow">员工确认开始服务</span>
                    {elseif condition="$orderdetails.status eq 7"/}<span class="badge bg-yellow">服务中</span>
                    {elseif condition="$orderdetails.status eq 8"/}<span class="badge bg-yellow">待评论</span>
                    {elseif condition="$orderdetails.status eq 9"/}<span class="badge bg-yellow">待回复</span>
                    {elseif condition="$orderdetails.status eq 10"/}<span class="badge bg-yellow">已结束</span>
                    {elseif condition="$orderdetails.status eq 11"/}<span class="badge bg-yellow">美容师完成服务</span>
                    {/if}
                </address>
            </div>
            <div class="col-sm-3 invoice-col">
                <b><span style="font-size: 16px">用户信息</span></b><br>
                <address style="line-height: 28px; margin-top: 5px;">
                    用户编号：{$orderdetails.custom.id}<br>
                    手机号：{$orderdetails.custom.custom_phone}<br>
                    昵称：{$orderdetails.custom.custom_name}<br>
                    真实姓名: {$orderdetails.custom.real_name} 
                </address>
            </div>
            <!-- /.col -->
            <div class="col-sm-3 invoice-col">
                <b><span style="font-size: 16px">货物信息</span></b><br>
                {if condition="$orderdetails.itemdata.type eq 2"}
                <address style="line-height: 28px; margin-top: 5px;">
                    <span class="label label-danger">项目</span><br>
                    项目名称：{$orderdetails.itemdata.item.item_name}<br>
                    项目单价：{$orderdetails.itemdata.item.item_price}<br>
                    疗程价：{$orderdetails.itemdata.item.item_prices}
                </address>
                {elseif condition="$orderdetails.itemdata.type eq 3"/}
                <address style="line-height: 28px; margin-top: 5px;">
                    <span class="label label-danger">Vip卡</span><br>
                    卡号：{$orderdetails.itemdata.vip.vip_num}<br>
                    卡名称：{$orderdetails.itemdata.vip.vip_name}<br>
                    卡值额度：{$orderdetails.itemdata.vip.vip_lines}<br>
                    卡折扣: {$orderdetails.itemdata.vip.vip_discount}折<br>
                </address>
                {elseif condition="$orderdetails.itemdata.type eq 4"/}
                <address style="line-height: 28px; margin-top: 5px;">
                    <span class="label label-danger">体验卡</span><br>
                    项目名称：特价超值体验卡<br>
                    项目单价：{$orderdetails.itemdata.experience.price}<br>
                </address>
                {/if}
            </div>
            <!-- /.col -->
            <div class="col-sm-3 invoice-col">
                <b><span style="font-size: 16px">优惠信息</span></b><br>
                {if condition="$orderdetails.cun_id neq ''"}
                <address style="line-height: 28px; margin-top: 5px;">
                    <span class="label label-primary">代金券</span><br>
                    优惠金额：{$orderdetails.coupon.money}<br>
                    使用条件: {$orderdetails.coupon.reach}<br>
                </address>
                {elseif condition="$orderdetails.vip_id neq ''"/}
                <address style="line-height: 28px; margin-top: 5px;">
                    <span class="label label-primary">会员卡</span><br>
                    卡号：{$orderdetails.vipcard.vip_num}<br>
                    卡名称：{$orderdetails.vipcard.vip_name}<br>
                    卡值额度：{$orderdetails.vipcard.vip_lines}<br>
                    卡折扣: {$orderdetails.vipcard.vip_discount}折<br>
                </address>
                {else/}
                <address style="line-height: 28px; margin-top: 5px;">
                    <span class="label label-primary">暂无优惠信息</span><br>
                </address>
                {/if}
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->

        <!-- Table row -->
        <div class="row">
            <div class="col-xs-12">
                <h2 class="page-header">
                    <i class="glyphicon glyphicon-calendar"></i> 预约信息
                    <small class="pull-right">共{$onlinelist->total()}条记录</small>
                </h2>
            </div>
            <div class="col-xs-12 table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>编号</th>
                            <th>用户名称</th>
                            <th>服务项目</th>
                            <th>美容师</th>
                            <th>预约状态</th>
                            <th>服务时间</th>
                            <th>预约时间</th>
                        </tr>
                    </thead>
                    <tbody>
                        {volist name='onlinelist' id='admin'}
                        <tr>
                            <td>{$admin.id}</td>
                            <td>
                                {if condition="$admin.custom.real_name neq ''"}{$admin.custom.real_name}
                                {elseif condition="$admin.custom.custom_name neq ''"/}{$admin.custom.custom_name}
                                {elseif condition="$admin.custom.custom_phone neq ''"/}{$admin.custom.custom_phone}
                                {/if}
                            </td>
                            <td>{$admin.item.item_name}</td>
                            <td>{$admin.staff.staff_name}</td>
                            <td>

                                {if condition="$admin.status eq 0"}<span class="badge bg-yellow">已取消</span>
                                {elseif condition="$admin.status eq 1"/}<span class="badge bg-yellow">待支付</span>
                                {elseif condition="$admin.status eq 2"/}<span class="badge bg-yellow">待预约</span>
                                {elseif condition="$admin.status eq 3"/}<span class="badge bg-yellow">已预约</span>
                                {elseif condition="$admin.status eq 4"/}<span class="badge bg-yellow">待服务</span>
                                {elseif condition="$admin.status eq 5"/}<span class="badge bg-yellow">已拒绝</span>
                                {elseif condition="$admin.status eq 6"/}<span class="badge bg-yellow">员工确认开始服务</span>
                                {elseif condition="$admin.status eq 7"/}<span class="badge bg-yellow">服务中</span>
                                {elseif condition="$admin.status eq 8"/}<span class="badge bg-yellow">待评论</span>
                                {elseif condition="$admin.status eq 9"/}<span class="badge bg-yellow">待回复</span>
                                {elseif condition="$admin.status eq 10"/}<span class="badge bg-yellow">已结束</span>
                                {elseif condition="$admin.status eq 11"/}<span class="badge bg-yellow">美容师完成服务</span>
                                {/if}

                            </td>
                            <td>{$admin.start_time|date='Y-m-d H:i',###}</td>
                            <td>{$admin.add_time|date='Y-m-d H:i',###}</td>
                        </tr>
                        {/volist}
                    </tbody>
                </table>
            </div>
            <!-- /.col -->
        </div>
        <!-- this row will not appear when printing -->
        <div class="row no-print">
            <div class="col-xs-12">
                <a href="invoice-print.html" target="_blank" class="btn btn-default"><i class="fa fa-print"></i> Print</a>
                <button type="button" class="btn btn-success pull-right"><i class="fa fa-hourglass-1"></i> 待预约<?php echo $orderdetails['itemdata']['number']-$onlinelist->total()?>
                </button>
                <button type="button" class="btn btn-primary pull-right" style="margin-right: 5px;">
                    <i class="fa fa-hourglass-half"></i> 已预约{$onlinelist->total()}
                </button>
            </div>
        </div>
    </section>
    <!-- /.content -->
    <div class="clearfix"></div>
</div>
<!-- foot -->
{include file='public/foot' /}
<!-- foot -->